package 集合进阶;

import java.util.ArrayList;
import java.util.Collections;

public class Collections工具类 {
    public static void main(String[] args) {
        //1.创建集合对象
        ArrayList<String> list =new ArrayList<>();

        //2.批量添加元素
        Collections.addAll(list,"abc","bds","1332","fsd");

        //打印集合
        System.out.println(list);

        //4.利用shuffle打乱集合
        Collections.shuffle(list);
        System.out.println(list);
    }
}
